const mongoose = require('mongoose');//引入mongoose
require('./subjectModel');

const questionsSchema = new mongoose.Schema({
    analysis: String,
    answer: Array,
    KnowledgePointId: {
        type: mongoose.SchemaTypes.ObjectId,
        //关联集合模型，集合模型名在mongoose.model注册的名字
        ref:'subjectModel'
    },
    question: String,
    RightKey: String,
    score: Number
});
//暴露集合模型对象
const questionsModel = mongoose.model("questionsModel", questionsSchema, "questions");
module.exports = {questionsModel}